-- GENERATED SPELL FOR [Ghoul] --


function spell0_17895(pUnit, Event) --@Cannibalize,n/a--
pUnit:FullCastSpellOnTarget(31537,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17895', 12000, 1)
end

function spell1_17895(pUnit, Event) --@Enrage,Self--
pUnit:FullCastSpellOnTarget(31540,pUnit)
pUnit:RegisterEvent('Sorts_17895', 8000, 1)
end

function Sorts_17895(pUnit, Event)
local choix_sorts_17895 = math.random(0, 1)
if choix_sorts_17895 == 0 then
pUnit:RegisterEvent('spell0_17895', 1, 1)
end
if choix_sorts_17895 == 1 then
pUnit:RegisterEvent('spell1_17895', 1, 1)
end
end

function mob17895_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_17895', math.random(1500, 3000), 1)
end

function mob17895_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17895_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17895_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(17895, 1, 'mob17895_Action')
RegisterUnitEvent(17895, 2, 'mob17895_Leave')
RegisterUnitEvent(17895, 3, 'mob17895_Kill')
RegisterUnitEvent(17895, 4, 'mob17895_Die')
